package com.platform.data.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.platform.base.domain.BaseLocation;
import com.platform.common.annotation.Excels;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.platform.common.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import com.platform.common.core.domain.BaseEntity;

/**
 * 温度采集数据对象 temp_data
 * 
 * @author wangqi
 * @date 2020-09-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("temp_data")
public class TempData extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键id */
    @TableId(type = IdType.AUTO)
    private Long id;

    /** 温度采集器ID */
    @NotBlank(message = "温度采集器ID不能为空")
    @Excel(name = "温度采集器ID")
    private String tempId;

    /** 温度 */
    @Excel(name = "温度")
    private String temp;

    /** 电量 */
    @Excel(name = "电量")
    private String elec;

    /** 内部NTC故障报警 */
    @Excel(name = "内部NTC故障报警")
    private String alarm1;

    /** 外部NTC故障报警 */
    @Excel(name = "外部NTC故障报警")
    private String alarm2;

    /** 温湿度传感器故障报警 */
    @Excel(name = "温湿度传感器故障报警")
    private String alarm3;

    /** 地址信息 */
    @Excels({
            @Excel(name = "地址全称", targetAttr = "locationName"),
            @Excel(name = "地址代码", targetAttr = "locationId", type = Excel.Type.EXPORT)
    })
    @TableField(exist = false)
    private BaseLocation location;
    /** 地址id */
    @TableField(exist = false)
    private String locationId;
    /** 地址id */
    @TableField(exist = false)
    private String locationName;
}
